﻿package utils{	import flash.display.DisplayObjectContainer;	public class FindCurElement	{		public function FindCurElement()		{		}				public static function currentObj(_x:Number,_y:Number,arr:*,parent:DisplayObjectContainer):*		{			for (var i:uint = 0; i < arr.length; i++)			{				if (_x > (arr[i].x + parent.x) && _x < (arr[i].x + arr[i].width + parent.x ))				{					if (_y > (arr[i].y + parent.y) && _y < (arr[i].y + arr[i].height + parent.y ))					{																		return arr[i];					}									}			}			return null;		}				public static function currentIndex(_x:Number,_y:Number,arr:*,parent:DisplayObjectContainer):int		{			for (var i:uint = 0; i < arr.length; i++)			{				if (_x > (arr[i].x + parent.x) && _x < (arr[i].x + arr[i].width + parent.x ))				{					if (_y > (arr[i].y + parent.y) && _y < (arr[i].y + arr[i].height + parent.y ))					{												return i;					}									}			}			return -1;		}	}}